﻿using System;
using System.Windows.Forms;

namespace TfsBugger.Util.Ui
{
	public class WaitScope : IDisposable
    {
        #region Ctor
        public WaitScope(Control host)
        {
            m_host = host;
            m_host.Cursor = Cursors.WaitCursor;
        }
        #endregion 


        #region Fields
        private Control m_host;
        #endregion


        #region IDisposable Members
        public void Dispose()
        {
            m_host.Cursor = Cursors.Default;
        }
        #endregion
    }
}
